﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Petra.Gis.Geometry.Image.Tiff
{
  public partial class ImageFileDirectory
  {

    internal void checkCompression(Tag tag)
    {
      if (tag.Id == Tag.TagId.COMPRESSION)
      {
        if (tag.Count != 1 || !tag.isInt())
        {
          throw new InvalidFileStructureException("Expected " +
            " single byte/short/long value for compression " +
            "(count=" + tag.Count + ", type=" + tag.Type + ").");
        }
      }
    }
  }
}
